﻿using HZYProject.Domain;
using Microsoft.EntityFrameworkCore;
using System;
using System.Configuration;

namespace HZYProject.Data
{
    public class HZYProjectDbContext : DbContext
    {

        public HZYProjectDbContext(DbContextOptions<HZYProjectDbContext> options)
           : base(options)
        {
        }     
        public DbSet<User> Users { get; set; }
        public DbSet<Course> Courses { get; set; }
        public DbSet<Chapter> Chapters { get; set; }
        public DbSet<PractiseLog> PractiseLogs { get; set; }

        public DbSet<Article> Articles { get; set; }
        public DbSet<ArticleType> ArticleTypes { get; set; }
        public DbSet<Class> Classes { get; set; }
        public DbSet<Colleges> Colleges { get; set; }
        public DbSet<Comment> Comments { get; set; }
        public DbSet<Exam> Exams { get; set; }
        public DbSet<LikeTopic> LikeTopics { get; set; }
        public DbSet<Module> Modules { get; set; }
        public DbSet<ModuleCategory> ModuleCategories { get; set; }
        public DbSet<Question> Questions { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<Result> Results { get; set; }
        public DbSet<Student> Students { get; set; }
        public DbSet<TestPaper> TestPapers { get; set; }
        public DbSet<WrongTopic> WrongTopics { get; set; }


        public DbSet<View_ChapterCourse> View_ChapterCourse { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            
            //modelBuilder.Entity<User>().ToTable("Users");
            //modelBuilder.Entity<Course>().ToTable("Courses");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Article>().ToTable("Articles");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
            //modelBuilder.Entity<Chapter>().ToTable("Chapters");
        }
    }
}
